package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/Stock")
public class Stockfreezing {

    /*@RequestMapping(value = "/Stock")
    public String Stock(){
        return "Stockfreezing/Stockfreezing";
    }*/

    @Autowired
    SysMenuService menuService;

    //主页面
    @RequestMapping(value = "/Stock/{menu}")
    public String toKq(@PathVariable("menu") String menu, Model model) {
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "Stockfreezing/Stockfreezing";
    }

    @RequestMapping(value = "/Thawing")
    public String Thawing(String id, Model model){
        model.addAttribute("id",id);
        return "Stockfreezing/Thawing";
    }

    @RequestMapping(value = "/Inventory")
    public String Inventory(){
        return "Stockfreezing/Inventory";
    }
}
